#include <iostream>
#include <cstring>
#include <algorithm>
#include <vector>
#include <cmath>
#include <unordered_map>
#include <unordered_set>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <deque>
#include <functional>
#include <climits>

#define quickio ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
#define endl "\n"

using namespace std;
typedef long long ll;

const int N = 2e5 + 5;
char s[N];

void solve()
{
	int n, m, k;
	cin >> n >> m >> k;
	memset(s, 0, sizeof(s));
	s[0] = 'L';
	for (int i = 1; i <= n; i++)
		cin >> s[i];
	int i = 0;
	if (m > n)
	{
		cout << "YES" << endl;
		return;
	}

	int gap;
	//if (s[1] == 'L')
	//	i++;
	while (i < n + 1)
	{
		gap = m;
		while (s[i] == 'L' && i + gap < n + 1 && gap > 0 && s[i + gap] == 'C')
		{
			gap--;
		}

		if (i + gap >= n + 1)
		{
			cout << "YES" << endl;
			return;
		}

		if (gap > 0 && s[i + gap] == 'L')
			i += gap;
		else
		{
			int k1 = k;
			while (i < n + 1 && k1 > 0 && s[i] != 'C')
			{
				k1--;
				i++;
			}

			if (i < n + 1 && s[i] == 'C')
			{
				cout << "NO" << endl;
				return;
			}
		}
	}
	cout << "YES" << endl;
}

int main()
{
	int t;
	cin >> t;
	while (t--)
		solve();
	return 0;
}

/*
1
6 1 1
LWLLWL
*/